package com.gxa.meiye.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.gxa.meiye.admin.mapper.ShopsMapper;
import com.gxa.meiye.admin.service.ShopService;
import com.gxa.meiye.core.common.ResponseData;
import com.gxa.meiye.core.pojo.vo.ShopVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopServiceImpl extends ServiceImpl<ShopsMapper, ShopVO> implements ShopService {

    @Autowired
    private ShopsMapper shopsMapper;

    @Override
    public ResponseData queryAll() {
        ResponseData rd=new ResponseData();
        List<ShopVO> cs = shopsMapper.queryAll();
        rd.setCode(200);
        rd.setMsg("查询成功");
        rd.setData(cs);
        return rd;
    }

    @Override
    public ResponseData queryById(Integer id) {
        ResponseData rd=new ResponseData();
        List<ShopVO> cs = shopsMapper.queryById(id);
        rd.setCode(200);
        rd.setMsg("查询成功");
        rd.setData(cs);
        return rd;
    }
}
